﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SQLite;
using System.Data.SqlClient;
using System.Text;

namespace TM.DataAccessor
{
    public interface IDataAccessor
    {
        ConnectionState Open();
        ConnectionState Close();

        int ExecuteNonQuery();
        DataTable ExecuteReader();
        DataTable ExecuteReader(string sqlScript);
        DataTable ExecuteReader(string sqlScript, object[] parameters);

        IDbTransaction BeginTransaction(string transactionName = null);
        void EndTransaction(IDbTransaction theTransaction, bool isSuccess);

        IDbCommand Command { get; }
    }
}
